package demo1.dao.Mapper;

import demo1.pojo.*;

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.List;

public interface goodsMapper {
    List<goods> selectById(int id) throws Exception;
    List<goods_type> selectAllGoodsType() throws Exception;
    List<cancelOrder> selectCancelOrderById(int userID) throws Exception;
    List<goodsComment> lookGoodsComment(int goodsID) throws Exception;
    List<goods> selectByPage(int begin,int size) throws Exception;
    List<goods> onSubmit(int begin,int size,goods goods) throws Exception;
    List<goods> selectByPageMai(int begin,int size,int userID) throws Exception;
    int selectTotalCounts () throws Exception;
    int selectTotalCountsMai (int userID) throws Exception;
    int selectTotalCountsSubmit (goods goods) throws Exception;
    void addGoods(float price,String goodsMessage,String goodsName,String goodsType,int goodsNum,int id,String shopName) throws Exception;
    void addGoodsType(String type,int goodsID) throws Exception;//增加分类
    void insertGoodsComment(String goodsComment,int goodsID,int userID) throws Exception;
    void insertCancelOrder(String cancelReason,String goodsName,int goodsID,int userBuyID,int userMaiID,int price,int goodsNum,String userName,String userPhone,String userAddress,int orderFormID) throws Exception;
    void modifyGoodsAndTime(float price, String goodsMessage, String goodsName, String goodsType, int goodsNum, int goodsID,String statue) throws Exception;
    void modifyGoods(float price, String goodsMessage, String goodsName, String goodsType, int goodsNum, int goodsID,String statue) throws Exception;
    void modifyGoodsNum(int goodsNum, int goodsID) throws Exception;
    void modifyGoodsStatue(String statue, int goodsID) throws Exception;
    void modifyGoodsUrl(String url, int goodsID) throws Exception;
    void modifyGoodsShopName(String shopName, int userID) throws Exception;
    void modifyGoodsXiaoLiang(int goodsXiaoLiang, int goodsID) throws Exception;
    void modifyGoodsGreat(int goodsGreat, int goodsID) throws Exception;//修改好评数
    void modifyGoodsLookNum(int lookNum, int goodsID) throws Exception;//修改浏览量
    void modifyCancelOrderStatue(int statue, int orderID) throws Exception;//修改退货订单状态

    ResultSet selectByID(int goodsID) throws Exception;
    void deleteGoods(int[] ids) throws Exception;
    void deleteGoods2(int ids) throws Exception;

    List<goods> selectAllEarly() throws Exception;

}
